<div class="layui-row layui-col-space15">
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">表单宽度</span>
            <input name="setting[width]" value='{$width|default=""}' pattern="^\d+$" autocomplete="off" placeholder="请输入表单宽度" class="layui-input">
            <span class="color-desc">表单长度(单位百分比)</span>
        </label>
    </div>
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">表单样式</span>
            <input name="setting[css]" value='{$css|default=""}'  pattern="^[A-Za-z0-9_-]+$" placeholder="请输入表单样式名称" class="layui-input">
            <span class="color-desc">css样式的class名称</span>
        </label>
    </div>
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">字符长度最小取值范围</span>
            <input name="setting[min]" value='{$min|default="0"}'  pattern="^[0-9]+$" placeholder="请输入字符长度取值范围最小值" class="layui-input">
            <span class="color-desc">字符长度最小取值范围</span>
        </label>
    </div>
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">字符长度最大取值范围</span>
            <input name="setting[max]" value='{$max|default=""}'  pattern="^[0-9]+$" placeholder="请输入字符长度取值范围最大值" class="layui-input">
            <span class="color-desc">字符长度最大取值范围</span>
        </label>
    </div>
</div>
<!--更新操作不显示-->
{if !$isupdate}
<div class="layui-row layui-col-space15">
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">字段类型</span><br />
            {php}$default = !isset($chartype)?'':$chartype;{/php}
            {$type|raw|htmlspecialchars_decode|rendFieldOptions=$default}
        </label>
    </div>
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">字段长度</span>
            <input type="text" name="setting[length]" value='{$length|default="255"}'  autocomplete="off" required placeholder="请输入表单字段长度" class="layui-input">
        </label>
    </div>
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">默认值</span>
            <input type="text" name="setting[defaultvalue]" value='{$defaultvalue|default=""}' autocomplete="off" placeholder="请输入表单默认值" class="layui-input">
        </label>
    </div>
    <div class="layui-col-xs3">
        <label class="relative block">
            <span class="color-green font-w7">是否为密码框</span><br />
            {foreach :config('constant.YesOrNo') as $k=>$v}
            <!--{if (!isset($is_password) and $k eq '0') or (isset($is_password) and $is_password eq $k)}-->
            <input type="radio" name="setting[is_password]" checked value="{$k}" title="{$v}">
            <!--{else}-->
            <input type="radio" name="setting[is_password]" value="{$k}" title="{$v}">
            <!--{/if}-->
            {/foreach}
        </label>
    </div>
</div>
{/if}
<script>
    layui.use(['layer', 'jquery'], function () {
        var layer = layui.layer,
            $ = layui.jquery;
        layui.form.render();
    });
</script>